package module01_work;

import java.util.Scanner;

/**
 * 
 * @author 陈洛健
 * 
 * 提示用户输入年月日信息 打印输出今天是今天的第几天 
 *
 */
public class Work01 {
	public static void main(String[] args) {
		
		System.out.println("请输入年 月 日 以空格隔开 ：");
		Scanner sc = new Scanner(System.in);
		int year = sc.nextInt();
		int month = sc.nextInt();
		int day = sc.nextInt();
		int countDay = 0;
		
		switch (month) {
		case 1:
			countDay = day ;
			break;
		case 3:
			countDay = ((month-1) * 31) -3 ;
			break;
		case 5:
			countDay = ((month-1) * 31) - 4;
			break;
		case 7:
			countDay = ((month-1) * 31) - 5;
			break;
		case 8:
			countDay = ((month-1) * 31) - 5;
			break;
		case 10:
			countDay = ((month-1) * 31) - 6;
			break;
		case 12:
			countDay = ((month-1) * 31) - 7;
			
			break;
		
		case 2:
			countDay = ((month-1) * 31) ;
			
			break;
		case 4:
			countDay = ((month-1) * 31) -3;
			break;
		case 6:
			countDay = ((month-1) * 31) -4;
			break;
		case 9:
			countDay = ((month-1) * 31) -5;
			break;
		case 11:
			countDay = ((month-1) * 31) - 6;
			break;

		
		}
		countDay += day;
		if(countDay == 365) {
			System.out.println("今天是今年最后一天啦~~~");
			
		}else {
			System.out.println("这是一年中的第" + countDay +"天");
		}
	}
	
}
